package team.yidong.fenda.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import team.yidong.fenda.entity.HospitalActivity;

import java.util.List;

/**
 * Created by xuanlong on 2018/3/6.
 */
@Repository
public interface HospitalActivityRepository extends JpaRepository<HospitalActivity, Integer> {
    @Query("select hospitalActivity from HospitalActivity hospitalActivity where hospitalActivity.hospitalId=?1 and hospitalActivity.status='use'")
    List<HospitalActivity> findActivityListByHospitalId(Integer hospitalId);
}
